package com.xinsoft.controller.mes;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xinsoft.aop.ano.SysLog;
import com.xinsoft.common.BusinessType;
import com.xinsoft.common.Response;
import com.xinsoft.constant.Const;
import com.xinsoft.entity.dto.MesCraftDTO;
import com.xinsoft.entity.dto.MesDispatchHisPageParam;
import com.xinsoft.entity.dto.MesDispatchPageParam;
import com.xinsoft.entity.po.MesCraft;
import com.xinsoft.entity.po.SysConfig;
import com.xinsoft.service.MesDispatchHisService;
import com.xinsoft.service.MesDispatchService;
import com.xinsoft.validator.ValidatorUtils;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 开工、挂起记录
 */
@RestController
@RequestMapping("/scm/dispatchHis")
public class MesDispatchHisController {

    @Autowired
    private MesDispatchHisService mesDispatchHisService;


    /**
     * 删除
     */
    @PostMapping("/del")
    public Response<?> del(@RequestBody List<Long> ids) {
        mesDispatchHisService.removeByIds(ids);
        return Response.succeed();
    }

    /**
     * 分页
     */
    @PostMapping("/pageList")
    public Response<?> pageList(@RequestBody MesDispatchHisPageParam mesDispatchPageParam) {
        return mesDispatchHisService.findPageListByParam(mesDispatchPageParam);
    }
}
